﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/PMAdmin.Master"
    CodeBehind="BankTransactions.aspx.cs" Inherits="PM.Site.Admin.BankTransactions" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="form_left">
        <div>
            <asp:Label ID="lblMsg" runat="server" Text="" Visible="false"></asp:Label>
        </div>
        <div style="float: left; margin-left: 10px;">
            <asp:Panel ID="pnlAddBankTransaction" runat="server" GroupingText="Add Bank Transaction"
                Font-Size="Medium">
                <table style="font-size: smaller;" id="div_left">
                    <tr>
                        <td style="width: 100px">
                            Transaction Id
                        </td>
                        <td>
                            :
                            <asp:TextBox ID="txbTransId" runat="server" TextMode="SingleLine" Enabled="false"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 100px">
                            Account No
                        </td>
                        <td>
                            :
                            <asp:DropDownList ID="ddlAccNos" runat="server" Width="250">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 100px">
                            Debit/Credit
                        </td>
                        <td>
                            :
                            <asp:DropDownList ID="ddlDebitCredit" runat="server" Width="250">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Amount
                        </td>
                        <td>
                            :
                            <asp:TextBox ID="txbAmount" runat="server" TextMode="SingleLine"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 100px">
                            Transaction Date
                        </td>
                        <td>
                            :
                            <asp:TextBox ID="txbTransDate" runat="server" TextMode="SingleLine"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Posted
                        </td>
                        <td>
                            :
                            <asp:CheckBox ID="chkbPosted" runat="server" Checked="false" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" />
                            &nbsp;
                            <asp:Button ID="btnNew" runat="server" Text="New" OnClick="btnNew_Click" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </div>
    </div>
    <br style="clear: both;" />
    <br />
    <div class="form_left">
        <asp:Panel ID="pnlOverviewBankTrans" runat="server" Font-Size="Medium" GroupingText="Overview Bank Transactions"
            Width="952">
            <br style="height:10px; width:100%;" />
            <div class="form_left">
                <p style="font-size: small; font-weight: bold;">
                    Account No : &nbsp;<asp:DropDownList ID="ddlAccountNos" runat="server" AutoPostBack="true"
                        OnSelectedIndexChanged="ddlAccountNos_SelectedIndexChanged">
                        <asp:ListItem Text="~Select all~" Value="" Selected="True"></asp:ListItem>
                    </asp:DropDownList>
                </p>
            </div>
            <br style="clear: both;" />
            <br />
            <div style="padding: 5px;">
                <asp:DataList ID="dlBankTrans" DataKeyField="TransactionId" runat="server" Visible="true"
                    RepeatDirection="Horizontal" CellPadding="0" CellSpacing="0" Font-Size="Small"
                    ItemStyle-BackColor="#F6F4F5" ItemStyle-BorderColor="#6B6B6B" ItemStyle-BorderWidth="1px"
                    HeaderStyle-BackColor="#444444" HeaderStyle-Height="30px" RepeatColumns="1" RepeatLayout="Flow"
                    OnItemCommand="dlBankTrans_ItemCommand">
                    <AlternatingItemStyle BackColor="#F9F9F9" />
                    <HeaderTemplate>
                        <div style="padding-bottom: 0px; height: 30px; margin: 0px; color: White;">
                            <div style="width: 170px; float: left; text-align: center; font-weight: bold; padding-left: 2px;">
                                Transaction Id</div>
                            <div style="width: 150px; float: left; text-align: center; font-weight: bold;">
                                Account No</div>
                            <div style="width: 100px; float: left; text-align: center; font-weight: bold;">
                                Debit/Credit</div>
                            <div style="width: 180px; float: left; text-align: center; font-weight: bold;">
                                Amount</div>
                            <div style="width: 180px; float: left; text-align: center; font-weight: bold;">
                                Transaction Date</div>
                            <div style="width: 60px; float: left; text-align: center; font-weight: bold;">
                                Posted</div>
                            <div style="width: 72px; float: left; text-align: center; font-weight: bold;">
                                Edit</div>
                        </div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div style="float: left; margin-bottom: 0px; min-height: 15px; font-size: small;">
                            <div style="width: 170px; float: left; text-align: center; min-height: 12px; padding-left: 2px;">
                                <label>
                                    <%# Eval("TransactionId")%></label></div>
                            <div style="width: 150px; float: left; text-align: center; min-height: 12px;">
                                <label>
                                    <%# Eval("AccNo")%></label></div>
                            <div style="width: 60px; float: left; text-align: right; min-height: 12px;">
                                <label>
                                    <%# Eval("DebitCredit")%></label></div>
                            <div style="width: 150px; float: left; text-align: right; min-height: 12px;">
                                <label>
                                    <%# Eval("Amount", "{0:0.00}")%></label></div>
                            <div style="width: 200px; float: left; text-align: right; min-height: 12px;">
                                <label>
                                    <%# ((DateTime)Eval("TransDate")).ToShortDateString() %></label></div>
                            <div style="width: 95px; float: left; text-align: right; font-weight: bold;">
                                <asp:CheckBox ID="chkPosted" Checked='<%#Eval("AccPosted") %>' Enabled='<%# !(bool)Eval("AccPosted") %>'
                                    runat="server" /></div>
                            <div style="width: 60px; text-align: right; vertical-align: top; float: left; padding-right: 25px;">
                                <asp:ImageButton ID="imgEdit" CommandName="EditBankTrans" Visible='<%# !(bool)Eval("AccPosted") %>'
                                    CommandArgument='<%# Eval("TransactionId")%>' ImageUrl="~/Images/Edit.gif" runat="server"
                                    AlternateText="Edit Bank Transaction" />
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </div>
            <br />
            <div style="float: right;">
                <asp:Button ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_Click" />
            </div>
        </asp:Panel>
    </div>
</asp:Content>
